<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>获取多维数组最长子数组</title>
	<script type="text/javascript">
		function getMaxlength(arr){
			var j=1;
			for(var i=1;i<arr.length;i++){
				if(arr[i] instanceof Array){
					if(arr[i].length>j){
						j=i;
					}
				}
			}
			return arr[j];
	}
	var arr = [1,2,3,4,[5,6,7,8],[9,10,11,12,13,14],15,[16,17,18,19,20],[21,22,23,24,25,26,27,28],29];
	document.write(getMaxlength(arr));

	</script>
</head>
<body>
	
</body>
</html>